import Vue from 'vue';
import localforage from 'localforage';
import App from './App.vue';
import { router } from './router';
import store from './store';
import http from './libs/http';
import registerRouterWatcher from './router/routerWatcher';
import echarts from 'echarts';

import './plugins/element.js';
import '../src/assets/css/global.css';
import '../src/assets/fonts/iconfont.css';

registerRouterWatcher(router);

Object.defineProperty(Vue.prototype, '$db', { value: localforage });
Object.defineProperty(Vue.prototype, '$http', { value: http });

Vue.config.productionTip = false;
Vue.prototype.$echarts = echarts;

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount('#app');
